/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.sidora.opcit.core;

import java.util.Set;
import javax.swing.ImageIcon;

/**
 *
 * @author etartera
 */
public class SimpleReference implements Reference{
    
    private String id;
    
    private Set <Keyword> keys;
    
    private Set <Note> notes;
    
    private String authors;
    
    private String year;
    
    private String title;
    
    private String pages;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAuthors() {
        return authors;
    }

    public void setAuthors(String authors) {
        this.authors = authors;
    }

    public Set<Keyword> getKeys() {
        return keys;
    }

    public void setKeys(Set<Keyword> keys) {
        this.keys = keys;
    }

    public Set<Note> getNotes() {
        return notes;
    }

    public void setNotes(Set<Note> notes) {
        this.notes = notes;
    }

    public String getPages() {
        return pages;
    }

    public void setPages(String pages) {
        this.pages = pages;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getReference() {
       String ref =
               "<html>"+
		"<b><font face=\'Georgia\' size= \'4\'> "+id.trim()+" </b></font>"+
		"<p><font face=\'Georgia\'size= \'3\'> "+title+"</p>"+
		"</html>";
       
		return ref;
    }

    public boolean hasKeys() {
        return !keys.isEmpty();
    }

    public boolean hasNotes() {
        return !notes.isEmpty();
    }

    public ImageIcon getType() {
        return new ImageIcon("org/sidora/opcit/resources/SimpleReference.png");
    }

}
